var nowDate = getDay(0);
var pandianid = GetQueryString('pandianid');
var shopcode = sessionStorage.getItem("shopcode");
var userId = sessionStorage.getItem("userId");

$(document).ready(function(){  //界面切换
	$('#name').text(sessionStorage.getItem("name"));
	$('#shopname').text(sessionStorage.getItem("shopname"));
 	if(sessionStorage.getItem("Creload")=='true'){
	     window.location.reload();
		 sessionStorage.setItem("Creload", false);
	}else{
		getPandianJianShopDaibanList();
		
  }
	
});
//查询门店盘点进度信息
function getPandianJianShopDaibanList(){
	var sendData = {};
	sendData.pandianid=pandianid;
	$.ajax({
		url: "../pandianevery/getPandianJianShopDaibanList"
		,type:'post'
//		,async: false
		,data:JSON.stringify(sendData)
		,contentType: "application/json; charset=utf-8"
		,dataType:'json'
		,success: function(res){
			console.log(res)
			$('#dataTable').empty();
			if(res.success){
				var resdata = res.data;
				for (var i = 0; i < resdata.length; i++) {
					
					$('#dataTable').append('<tr class="thin-border-bottom">'
							+'	<td class="td_left">'+resdata[i].itemname+'</td>'
							+'	<td style="" class="">'+resdata[i].flagname+'</td>'
							+'</tr>');
				}
				
			}else{
//				layer.alert(res.message);
			}
		}
		,error:function(XMLHttpRequest, textStatus, errorThrown) {
			 console.log(XMLHttpRequest);
			 console.log(textStatus);
			 console.log(errorThrown);
			 hideloading();
		}
	});
	
}

//跳转到评价页面
function inPingjia(pingjiaFlag){
	window.location.href='toJiancha_pingjia?pandianid='+pandianid+"&pingjiaFlag="+pingjiaFlag;
}